import axios from 'axios'
// 获取学科列表
export function getSubjectList() {
  return axios({
    url: '/mock/content/allSubject',
    method: 'get'
  })
}
// 获取词汇列表
export function getWordList(params) {
  return axios({
    url: '/mock/content/word',
    method: 'get',
    params
  })
}
// 添加词汇
export function addWord(data) {
  return axios({
    url: '/mock/content/word',
    method: 'post',
    data
  })
}
// 获取词汇详情
export function getWordDetail(id) {
  return axios({
    url: '/mock/content/word',
    method: 'get',
    params: { id }
  })
}
// 编辑词汇
export function editWord(data) {
  return axios({
    url: '/mock/content/word',
    method: 'put',
    data
  })
}

// 删除词汇
export function delWord(id) {
  return axios({
    url: '/mock/content/word',
    method: 'delete',
    params: { id }
  })
}
